function cfdInitialPhyFields
%--------------------------------------------------------------------------
%  Written by LiuHaHa @ NWPU, 2022 01 
%  Contact me at: liuzhikan@mail.nwpu.edu.cn
%==========================================================================
% Routine Description:
%   This function initialize the flow field ( Phy  Resd  Phy_grad  ...
%   fluxFace )
%--------------------------------------------------------------------------
global cfdFlow slvpara;

% Get info
theNumberOfElements = cfdFlow.mesh.numberOfElements;
theNumberOfFaces = cfdFlow.mesh.numberOfFaces;
numberOfBFaces = cfdFlow.mesh.numberOfBFaces;

cfdFlow.gama = 1.4;
cfdFlow.PhyTotalTime = 0.0;
cfdFlow.Pr_L = 0.72;
cfdFlow.Resd = zeros(theNumberOfElements + numberOfBFaces,slvpara.ND+2);
cfdFlow.Phy     = zeros(theNumberOfElements + numberOfBFaces,slvpara.ND+2);
cfdFlow.phyPre  = zeros(theNumberOfElements + numberOfBFaces,slvpara.ND+2);
cfdFlow.PhyFace = zeros(theNumberOfElements + numberOfBFaces,slvpara.ND+2);
cfdFlow.BounPhyGhost = zeros(theNumberOfElements + numberOfBFaces,slvpara.ND+2);
cfdFlow.fluxFace = zeros(theNumberOfFaces,slvpara.ND+2);
cfdFlow.eignV = zeros(theNumberOfElements + numberOfBFaces,1);
cfdFlow.fileOpenId = 1234;
cfdFlow.solver_flx_Flag = true;
cfdFlow.timeInitial = 1;

if (slvpara.solver_flx_order > 1)
    cfdFlow.Phy_grad = zeros(theNumberOfElements + numberOfBFaces, slvpara.ND+2, slvpara.ND); 
end

if (slvpara.initKind == 1)
    cfdInitialFreeStream;
elseif(slvpara.initKind == 2)
    cfdInitialShockTube;
elseif(slvpara.initKind == 3)
    cfdInitialReadSteadyRestartFile;
elseif(slvpara.initKind == 4)
    cfdInitialReadUnSteadyRestartFile;
else
    error('\nError: unrecognized initial function option \n')
end

fprintf('==================Geometry and Flow Parameters====================\n');
fprintf('Cells:  %d\n', cfdFlow.mesh.numberOfElements);
fprintf('Faces:  %d\n', cfdFlow.mesh.numberOfFaces);
fprintf('Nodes:  %d\n', cfdFlow.mesh.numberOfPoints);
fprintf('Spatial discretizaion:  %s\n', slvpara.kind_flx_splt);
fprintf('Time advancing:  %s\n', slvpara.kind_adv);
fprintf('CFL number(1st):  %f\n', slvpara.CFL);
fprintf('CFL number(2nd):  %f\n', slvpara.CFL_2nd);
fprintf('Mach number:  %f\n', slvpara.Ma);
fprintf('Reynolds number:  %f\n', slvpara.Re);
fprintf('Limiter functions:  %s\n', slvpara.grad_limit);
fprintf('Angle of attack:  %f\n', slvpara.Alpha);
fprintf('Angle of sideslip:  %f\n', slvpara.Beta);
fprintf('==================================================================\n');




